<template>
    <div class="qingwu">
        <div class="admin_table_page_title">
            <a-button @click="$router.back()" class="float_right" icon="arrow-left">返回</a-button>
            评论信息
        </div>
        <div class="unline underm"></div>

        <div class="admin_table_list">
            <a-table :columns="columns" :data-source="data" :pagination="false"
                     :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" row-key="id">

                <span slot="label" slot-scope="rows">
                    <div class="admin_goods_pic_txt">
                        <div><div v-for="(value, index) in rows.label ">#{{value}}</div></div>
                    </div>
                </span>


            </a-table>
        </div>
    </div>
</template>

<script>
    import Viewer from 'v-viewer'
    import 'viewerjs/dist/viewer.css'

    Vue.use(Viewer)
    export default {
        components: {},
        props: {},
        data() {
            return {
                data: [],
                id: 0,
                columns: [
                    {title: '#', dataIndex: 'id', fixed: 'left'},
                    {title: '用户ID', dataIndex: 'user_id'},
                    {title: '评论内容', dataIndex: 'content'},
                    {title: '发布时间', dataIndex: 'created_at'},
                ],
            };
        },
        watch: {},
        computed: {},
        methods: {
            get_info() {
                this.$get(this.$api.getCircle + '/' + this.id).then(res => {
                    this.data = res.data;
                })
            },
            // 获取菜单列表
            onload() {
                // 判断你是否是编辑
                if (!this.$isEmpty(this.$route.params.id)) {
                    this.id = this.$route.params.id;
                    this.get_info();
                }
            },


        },
        created() {
            this.onload();
        },
        mounted() {
        }
    };
</script>
<style lang="scss" scoped>

    .verify_btn {
        margin-top: 30px;
    }
</style>
